FROM openjdk:8
COPY target/*.jar /usr/application/
ENV MAGIC_JOY_PROFILE=${MAGIC_JOY_PROFILE} JAVA_OPTIONS=$JAVA_OPTIONS
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
CMD java -XX:NewRatio=3 -XX:SurvivorRatio=3 -XX:+UseParallelGC -XX:ParallelGCThreads=4 -XX:+UseParallelOldGC $JAVA_OPTIONS -Xss512k  -jar /usr/application/Spring-cloud-service.jar --spring.profiles.active=${MAGIC_JOY_PROFILE} --server.port=9001
